home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 4 / ETO Development Tools 4.iso / Essentials / MacApp Documentation / MacApp.TECH$ Archives / 1990 / Jan 90 / MacApp.Tech$ 1⁄19⁄90 / 0431-Re if Focus then;-Jan90 < prev    next >
Encoding:
Text File  |  1991-03-06  |  1.3 KB  |  48 lines  |  [TEXT/GEOL]

  1. Item    8727321                         15-Jan-90        21:23
  2.  
  3. From:   D5295                           Reseach SW Design, D Goldman,PRT
  4.  
  5. To:     MADA2                           MacApp Dev Assoc, Curtis Faith
  6.  
  7. cc:     MACAPP.TECH$                    MacApp Technical
  8.  
  9. Sub:    Re: if Focus then;
  10.  
  11. Curtis --
  12.  
  13. Focus fails not only when there is no window, but also when the view is not
  14. currently visible (eg, it's outside the visible region of its scroller).
  15.  
  16. In my code, in which I've got a big dialog inside a scroller, there are places
  17. where I need to frame a section of a procedure like this:
  18.  
  19.             if Focus then
  20.               BEGIN
  21.               :
  22.               :
  23.               END;
  24.  
  25. because the view may or may not be currently visible. However, there are lots
  26. of other places where I know that the view must be at least partially visible
  27. (things called from DoMouseCommand, for example, where we could only be invoked
  28. if the user was able to mouse-down inside us), in which cases it is sufficient
  29. to use the old:
  30.  
  31.             if Focus then;
  32.             :
  33.             :
  34.  
  35. which has the advantage of looking almost like:
  36.  
  37.             Focus;
  38.             :
  39.             :
  40.  
  41. which is all we usually need to intend to mean.
  42.  
  43. Does that help?
  44.  
  45. -- Dave Goldman
  46.    Research Software Design
  47.  
  48.